from flask_caching import Cache     #缓存
from flask_debugtoolbar import DebugToolbarExtension
from flask_mail import Mail         #邮件
from flask_migrate import Migrate   #迁移
from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()
migrate = Migrate()
mail = Mail()
cache = Cache(
    config={
        "CACHE_TYPE":"redis"
    }
)

def init_ext(app):
    db.init_app(app)
    migrate.init_app(app , db)
    mail.init_app(app)
    cache.init_app(app)
    # DebugToolbarExtension(app)

